home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / comm / cnet / cnet_toolkit.lha / routines / PARSE_NOSORT < prev    next >
Text File  |  1997-04-05  |  487b  |  4 lines

  1. PARSE: procedure expose it.; arg rng,min,max,srt;it.="";c=0;it=translate(rng,"  ",".,");do a=1 to words(it);c=c+1;it.c=word(it,a);if index(it.c,"-")>0 then do;parse var it.c x"-"y
  2.   if y="" then y=max;if x="" then x=min;if x>y then do;d=x;x=y;y=d;end;if x<min|y>max|~datatype(x,"W")|~datatype(y,"W") then do;c=c-1;iterate;end
  3.   do b=x to y;it.c=b;c=c+1;end;c=c-1;end;else if it.c<min|it.c>max|~datatype(it.c,"W") then do;c=c-1;iterate;end;end;do i=1 to c;it.0=it.0||it.i" ";end;return c
  4.